package com.jing21.learn;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.messaging.Message;
import org.springframework.messaging.SubscribableChannel;

/**
 * Created by 郑靖 on 2017/9/18.
 */
//@EnableBinding(SimpleListener.SimpleSink.class)
public class SimpleListener {

//    @StreamListener(SimpleSink.SINK)
    public void receiver(Message<String> message){

        System.err.println("receiver:" + message.getPayload());

    }
    public interface SimpleSink{

        String SINK = "simple-input";

        @Input(SINK)
        SubscribableChannel input();

    }
}
